package com.hnevc.foodserverapi.service.impl;


import com.hnevc.foodserverapi.dao.CommentsMapper;
import com.hnevc.foodserverapi.pojo.Comments;
import com.hnevc.foodserverapi.service.CommentsService;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
@Primary
public class CommentsServiceImpl implements CommentsService {
    @Resource
    CommentsMapper commentsMapper;
    @Override
    public List<Comments> queryComment() {
        return commentsMapper.queryComment();
    }

    @Override
    public List<Comments> queryCommentDetails(int foodid) {
        return commentsMapper.queryFoodidDetails(foodid);
    }

    @Override
    public int addComment(Comments comments) {
        return commentsMapper.addComment(comments);
    }

    @Override
    public List<Comments> queryIdDetails(int id) {
        return commentsMapper.queryIdDetails(id);
    }
}
